<?php

namespace Database\Seeders;

use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;

class SettingSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $settings = [
            [
                'key' => 'site_name',
                'display_name' => '网站名称',
                'value' => 'Orchid CMS',
                'group' => 'general',
                'created_at' => now(),
                'updated_at' => now(),
            ],
            [
                'key' => 'site_description',
                'display_name' => '网站描述',
                'value' => '基于Laravel Orchid构建的内容管理系统',
                'group' => 'general',
                'created_at' => now(),
                'updated_at' => now(),
            ],
            [
                'key' => 'site_keywords',
                'display_name' => '网站关键词',
                'value' => 'Laravel, Orchid, CMS, 内容管理, 博客',
                'group' => 'general',
                'created_at' => now(),
                'updated_at' => now(),
            ],
            [
                'key' => 'site_logo',
                'display_name' => '网站Logo',
                'value' => '/images/logo.png',
                'group' => 'general',
                'created_at' => now(),
                'updated_at' => now(),
            ],
            [
                'key' => 'site_favicon',
                'display_name' => '网站图标',
                'value' => '/images/favicon.ico',
                'group' => 'general',
                'created_at' => now(),
                'updated_at' => now(),
            ],
            [
                'key' => 'contact_email',
                'display_name' => '联系邮箱',
                'value' => 'contact@example.com',
                'group' => 'contact',
                'created_at' => now(),
                'updated_at' => now(),
            ],
            [
                'key' => 'contact_phone',
                'display_name' => '联系电话',
                'value' => '+86 123-4567-8900',
                'group' => 'contact',
                'created_at' => now(),
                'updated_at' => now(),
            ],
            [
                'key' => 'contact_address',
                'display_name' => '联系地址',
                'value' => '北京市朝阳区某某大厦',
                'group' => 'contact',
                'created_at' => now(),
                'updated_at' => now(),
            ],
            [
                'key' => 'social_wechat',
                'display_name' => '微信公众号',
                'value' => '@example',
                'group' => 'social',
                'created_at' => now(),
                'updated_at' => now(),
            ],
            [
                'key' => 'social_weibo',
                'display_name' => '微博账号',
                'value' => '@example',
                'group' => 'social',
                'created_at' => now(),
                'updated_at' => now(),
            ],
            [
                'key' => 'social_github',
                'display_name' => 'GitHub账号',
                'value' => '@example',
                'group' => 'social',
                'created_at' => now(),
                'updated_at' => now(),
            ],
            [
                'key' => 'posts_per_page',
                'display_name' => '每页文章数',
                'value' => '10',
                'group' => 'content',
                'created_at' => now(),
                'updated_at' => now(),
            ],
            [
                'key' => 'comment_enabled',
                'display_name' => '启用评论',
                'value' => '1',
                'group' => 'content',
                'created_at' => now(),
                'updated_at' => now(),
            ],
            [
                'key' => 'registration_enabled',
                'display_name' => '允许注册',
                'value' => '1',
                'group' => 'user',
                'created_at' => now(),
                'updated_at' => now(),
            ],
            [
                'key' => 'maintenance_mode',
                'display_name' => '维护模式',
                'value' => '0',
                'group' => 'system',
                'created_at' => now(),
                'updated_at' => now(),
            ],
        ];

        DB::table('settings')->insert($settings);
    }
}